<template>
    <el-dialog v-model="dialogVisible" title="编辑" width="1500px" draggable>
        <AddOrder :orderData="orderData" :handleType="HandleType.EIDT" @handleUpdated="emits('handleUpdated')" @handleCancel="closeDialog"/>
    </el-dialog>
</template>


<script lang="ts" setup>
import { ref, onMounted, watch } from 'vue';
import AddOrder from '../../recordOrder/AddOrder.vue';
import { HandleType } from '../../const';
const emits = defineEmits(['handleUpdated'])
const props = defineProps({
    orderData: {
        type: Object,
        default: {}
    }
})
const dialogVisible = ref(false);
const openDialog = () => {
    dialogVisible.value = true;
};
const closeDialog = () => {
    dialogVisible.value = false;
};

// watch(props, () => {
//     console.log('props -=== ', props);
// })

defineExpose({ openDialog, closeDialog });
</script>
  